/*
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
	"fmt"

	"github.com/spf13/cobra"
)

// remoteListCmd represents the remoteList command
var remoteListCmd = &cobra.Command{
	Use:   "list",
	Short: "列出已有服务器",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {

		if checkWater(REMOTE_HOST) {
			fmt.Printf("%v 状态 : 可用\n", REMOTE_HOST)
		} else {
			fmt.Printf("%v 状态 : 不可用\n", REMOTE_HOST)
		}
	},
}

func init() {
	remoteCmd.AddCommand(remoteListCmd)

	// Here you will define your flags and configuration settings.

	// Cobra supports Persistent Flags which will work for this command
	// and all subcommands, e.g.:
	// remoteListCmd.PersistentFlags().String("foo", "", "A help for foo")

	// Cobra supports local flags which will only run when this command
	// is called directly, e.g.:
	// remoteListCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
